import request from "@/utils/request";

export function listInvestment(params) {
  return request({
    url: "/investment",
    method: "get",
    params,
  });
}

export function listPageInvestment(params) {
  return request({
    url: "/investment/page",
    method: "get",
    params,
  });
}

export function saveInvestment(params) {
  return request({
    url: "/investment",
    method: "post",
    data: params,
  });
}

export function updateInvestment(id,params) {
  return request({
    url: `/investment/${id}`,
    method: "put",
    data: params,
  });
}

export function deleteInvestment(id) {
  return request({
    url: `/investment/${id}`,
    method: "delete",
  });
}

export function deleteBatchInvestment(idList) {
  return request({
    url: `/investment/batch`,
    method: "delete",
    data: idList,
  });
}

export function getInvestmentById(id) {
  return request({
    url: `/investment/${id}`,
    method: "get",
  });
}

